function deepClone(obj) { 
  if (obj === null) return obj; 
  if (obj instanceof Date) return new Date(obj); 
  if (obj instanceof RegExp) return new RegExp(obj); 
  if (typeof obj !== "object") return obj; 
  let cloneObj = new obj.constructor(); 
  for (let key in obj) { 
    if (obj.hasOwnProperty(key)) {        // 实现一个递归拷贝        
      cloneObj[key] = deepClone(obj[key]);      
    }    
  }    
  return cloneObj;
}
